package hcn.protocol.brandnew.dengji.jianchayuyue;

import com.fasterxml.jackson.annotation.JsonFormat;
import ctd.util.xml.jaxb.DateAdapter;
import lombok.Data;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.util.Date;


/**
 * 确认预约-响应消息（成功） - ODS_02070010_SUC
 *
 * @author enjoyLife
 */
@Data
@XmlRootElement(name = "Data")
@XmlAccessorType(XmlAccessType.FIELD)
public class ConfirmAppointResponse {

    /**
     * 患者信息
     */
    @XmlElement(name = "Patient")
    private Patient patient;
    /**
     * 条目
     */
    @XmlElement(name = "Item")
    private Item item;

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class Patient {

        /**
         * 患者姓名
         */
        @XmlElement(name = "Name")
        private String name;
        /**
         * 出生日期
         */
        @XmlElement(name = "BirthDate")
        @XmlJavaTypeAdapter(DateAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
        private Date birthDate;
        /**
         * 性别代码
         */
        @XmlElement(name = "Sex")
        private String sex;
        /**
         * 门诊号吗
         */
        @XmlElement(name = "ClinicNumber")
        private String clinicNumber;
        /**
         * 住院号码
         */
        @XmlElement(name = "InhospitalNumber")
        private String inhospitalNumber;
    }

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class Item {

        /**
         * 检查申请单号
         */
        @XmlElement(name = "RequestId")
        private String requestId;
        /**
         * 检查项目代码
         */
        @XmlElement(name = "ItemCode")
        private String itemCode;
        /**
         * 检查项目名称
         */
        @XmlElement(name = "ItemName")
        private String itemName;
        /**
         * 预约标志
         */
        @XmlElement(name = "IsAppointment")
        private String isAppointment;
        /**
         * 预约记录流水号
         */
        @XmlElement(name = "AppointsId")
        private String appointsId;
        /**
         * 预约时间
         */
        @XmlElement(name = "AppointsDateTime")
        private String appointsDateTime;
        /**
         * 预约执行机构
         */
        @XmlElement(name = "AppointsOrganization")
        private String appointsOrganization;
        /**
         * 预约执行科室
         */
        @XmlElement(name = "AppointsDept")
        private String appointsDept;
        /**
         * 预约执行科室名称
         */
        @XmlElement(name = "AppointsDeptName")
        private String appointsDeptName;
        /**
         * 预约队列
         */
        @XmlElement(name = "AppointsQueue")
        private String appointsQueue;
        /**
         * 预约队列名称
         */
        @XmlElement(name = "AppointsQueueName")
        private String appointsQueueName;
        /**
         * 预约顺序号
         */
        @XmlElement(name = "AppointsNo")
        private String appointsNo;
        /**
         * 检查地点
         */
        @XmlElement(name = "AppointAddress")
        private String appointAddress;
        /**
         * 注意事项
         */
        @XmlElement(name = "AppointAttention")
        private String appointAttention;
        /**
         * 是否空腹
         */
        @XmlElement(name = "EmptyStomach")
        private String emptyStomach;
        /**
         * 是否憋尿
         */
        @XmlElement(name = "HoldUrine")
        private String holdUrine;
        /**
         * 申请时间
         */
        @XmlElement(name = "RequestTime")
        private String requestTime;
        /**
         * 申请科室
         */
        @XmlElement(name = "RequestDept")
        private String requestDept;
        /**
         * 申请科室名称
         */
        @XmlElement(name = "RequestDeptName")
        private String requestDeptName;
        /**
         * 申请医师
         */
        @XmlElement(name = "RequestDoctor")
        private String requestDoctor;
        /**
         * 申请医师姓名
         */
        @XmlElement(name = "RequestDoctorName")
        private String requestDoctorName;
        /**
         * 取报告地点
         */
        @XmlElement(name = "ReportAddress")
        private String reportAddress;
        /**
         * 检查时间段
         */
        @XmlElement(name = "TimePeriod")
        private String timePeriod;
        /**
         * 检查号
         */
        @XmlElement(name = "ExamCode")
        private String examCode;
    }

}
